<?php
/**
 * Created by IDEA.
 * User: dinesh
 * Date: Jun 27, 2012
 * Time: 10:34:47 AM
 * To change this template use File | Settings | File Templates.
 */
 ?>
 <link rel="stylesheet" type="text/css" href="css/dhtmlx/calendar/dhtmlxcalendar.css">
  <link rel="stylesheet" type="text/css" href="css/dhtmlx/calendar/skins/dhtmlxcalendar_dhx_skyblue.css">

<script src="js/jquery/jquery-1.7.1.min.js"></script>
<script type="text/javascript" src="js/jquery/jquery.validate.js"></script>
<script type="text/javascript" src="js/jquery/jquery.validate.js"></script>
<script src="js/dhtmlx/calendar/dhtmlxcalendar.js"></script>
   <div style="margin-top:10px">  </div>
 <fieldset>
   <legend>Profile Details</legend>
                           <div id="profileimg" style="float:right; margin-right:10px;margin-bottom:10px;background:#f1f1f1;padding:5px"><img src="images/profile/<?php echo $this->profile->fields['picture_src']?>" border="0" alt=""></div>
                          <div id="error"></div>

                          <form method="post" id="frmData" action="">
                              <input type="hidden" id="profile_id" name="profile_id" />
                              <div>
                               <table>
                                  <tr>
                                      <td width="200px"><label for="fullName">Name :</label></td>
                                      <td><input id="fullName" name="fullName" type="text" value="<?php echo $this->profile->fields['full_name']?>" /> <span id="fullNameInfo"> </span></td>
                                  </tr>
                                  <tr>
                                      <td> <label for="initName">Name with Initials:</label></td>
                                      <td><input id="initName" name="initName" type="text" value="<?php echo $this->profile->fields['init_name']?>"  /> <span id="initNameInfo"></span></td>
                                  </tr>
                                  <tr>
                                      <td> <label for="nic">NIC Number :</label></td>
                                      <td> <input id="nic" name="nic" type="text" value="<?php echo $this->profile->fields['nic']?>" /> <span id="nic1Info"></span></td>
                                  </tr>
                                  <tr>
                                      <td> <label for="birthday">Birthday :</label></td>
                                      <td><input id="birthday" name="birthday" type="text" value="<?php echo $this->profile->fields['birthday']?>"/><span id="birthdayInfo"></span></td>
                                  </tr>
                                   <tr>
                                      <td> <label for="gender">Gender :</label></td>
                                      <td><input id="gender" type="radio" name="gender" value="0"  <?php if($this->profile->fields['gender']==0) echo "checked"; ?> > Male <input type="radio"  id="gender1" name="gender" value="1" <?php if($this->profile->fields['gender']==1) echo "checked"; ?>> Female<span id="genderInfo"></span></td>
                                  </tr>
                                   <tr>
                                      <td> <label for="email">E-mail :</label></td>
                                      <td><input id="email" name="email" type="text" value="<?php echo $this->profile->fields['email']?>"/> <span id="emailInfo"></span></td>
                                  </tr>
                                  <tr>
                                      <td> <label for="theme">Theme :</label></td>
                                      <td> <?php echo $this->theme ?></td>
                                  </tr>
                               </table>
                              </div>

                          </form>
                    
					<table border="0" cellspacing="5px" cellpadding="0px" width="100%" style="margin-top:0px;">
						<tr>
							<td>
                                <button id="btnClose" onclick="closePage();" privilege="" class="clsButtonSmall">Close</button>
							    <button id="btnChangPass" onclick="changePassword();" privilege="USER.RESET.PASSWORD" class="clsButtonSmall">Change Password</button>
                                <button id="btnEdit" onclick="edit();" privilege="USER.EDIT" class="clsButtonSmall">Edit</button>
							</td>
							<td width="*" align="right">

								<button id="btnSave" onclick="save();" class="clsButtonSmall">Save</button>
							</td>
						</tr>
					</table>
				
 </fieldset>

<div id="changePassword" style="display:none;">
 <fieldset>
   <legend>Change Password</legend>


                          <form method="post" id="frmDataPassword" action="">
                              <input type="hidden" id="id" name="id" />

                              <div>
                               <table>
                                  <tr>
                                      <td width="200px"><label for="currentpw">Current Password :</label></td>
                                      <td><input id="currentpw" name="currentpw" type="password" /> <span id="currentpwInfo"> </span></td>
                                  </tr>
                                   <tr>
                                      <td> <label for="pass1">New Password :</label></td>
                                      <td> <input id="pass1" name="pass1" type="password" /> <span id="pass1Info"></span></td>
                                  </tr>
                                  <tr>
                                      <td> <label for="pass2">Confirm Password :</label></td>
                                      <td><input id="pass2" name="pass2" type="password" /><span id="pass2Info"></span></td>
                                  </tr>
                               </table>
                              </div>

                          </form>
                    <button style="margin-bottom:10px"   id="btnResetPass" onclick="resetPassword();" privilege="" class="clsButtonSmall">Reset Password</button>
                    <button id="btnHide" onclick="closePassword();" privilege="" class="clsButtonSmall">Close</button>
 </fieldset>
 
 </div>


 
<script src="js/user/profile.js"></script>
<?php
/*
if(isset($this->msg)){
     echo" <div  id='message1' class=".$this->msg['type'].">".$this->msg['str']."</div>   ";
    }
echo date('Y-m-d H:i:s', time());
  */
?>
<div id='messagePanel'> </div>

